//
//  RootViewController.m
//  OnlyOne
//
//  Created by lanou on 16/5/4.
//  Copyright © 2016年 psf. All rights reserved.
//

#import "RootViewController.h"
#import "HomeViewController.h"
#import "MusicViewController.h"
#import "MovieViewController.h"
#import "ReadViewController.h"
@interface RootViewController ()

@end

@implementation RootViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    HomeViewController *rootViiewVc = [[HomeViewController alloc]init];
    UINavigationController *rootNav = [[UINavigationController alloc]initWithRootViewController:rootViiewVc];
    rootNav.tabBarItem.title=@"首页";
   // rootNav.tabBarItem.image=[UIImage imageNamed:@"21-skull.png"];
  //  rootNav.tabBarItem.badgeValue =[NSString stringWithFormat:@"%d",10];
    ReadViewController *secondViiewVc = [[ReadViewController alloc]init];
    UINavigationController *SecondNav = [[UINavigationController alloc]initWithRootViewController:secondViiewVc];
    // 选中的时候的图片
  //  SecondNav.tabBarItem.selectedImage=[UIImage imageNamed:@"08-chat.png"];
    SecondNav.tabBarItem.title=@"阅读";
   // SecondNav.tabBarItem.image=[UIImage imageNamed:@"05-shuffle.png"];
    MusicViewController *threeViiewVc = [[MusicViewController alloc]init];
    UINavigationController *ThreeNav = [[UINavigationController alloc]initWithRootViewController:threeViiewVc];
    ThreeNav.tabBarItem.title =@"音乐";
  //  ThreeNav.tabBarItem.image=[UIImage imageNamed:@"08-chat.png"];
    MovieViewController *fourViiewVc = [[MovieViewController alloc]init];
    UINavigationController *FourNav = [[UINavigationController alloc]initWithRootViewController:fourViiewVc];
    FourNav.tabBarItem.title=@"电影";
  //  FourNav.tabBarItem.image=[UIImage imageNamed:@" "];
    // 标签视图控制器
    self.viewControllers = @[rootNav,SecondNav,ThreeNav,FourNav];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
